import Vue from 'vue'
import Vuex from 'vuex'
import { getTime, mouldData } from '../../utils/index.js'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    userInfo: {},
		dayTimeStorageData: {}
  },
  mutations: {
    setUserInfo (state, userInfo) {
      state.userInfo = {
				...state.userInfo,
				...userInfo
			}
    },
		setDayTimeStorageData (state, data) {
			state.dayTimeStorageData = {
				...state.dayTimeStorageData,
				...data
			}
			let dayTime = getTime()
			// uni.setStorageSync(dayTime, state.dayTimeStorageData)
		}
  }
})


export default store